/**
 * Created by Amaris on 2016/10/11.
 */

managerApp.factory("rpFactory", ['$http', function ($http) {
    var rp = {};

    rp.getStaffInfo = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/rp/getStaffInfo", params, function (response) {
            callback(response);
        })
    };

    rp.getList = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/rp/getList", params, function (response) {
            callback(response);
        })
    };

    rp.getDistrictList = function (params, callback) {
        angularHttpGet($http, "/smtool_project/api/rp/getDistrictList", params, function (response) {
            callback(response);
        })
    };

    rp.createStaff = function (params, callback) {
        angularHttpPost($http, "/smtool_project/api/rp/createStaff", params, function (response) {
            callback(response);
        })
    };

    rp.editStaff = function (params, callback) {
        angularHttpPost($http, "/smtool_project/api/rp/editStaff", params, function (response) {
            callback(response);
        })
    };

    rp.deleteStaff = function (params, callback) {
        angularHttpPost($http, "/smtool_project/api/rp/deleteStaff", params, function (response) {
            callback(response);
        })
    };

    return rp;
}]);
